﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ucSanPhamBanChay.ascx.cs"
    Inherits="usercontrol_ucSanPhamBanChay" %>
<div style="margin-top: 15px" class="box4">
    <div class="box_main4">
        <div class="box_pro">
            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                    <td>
                        <table id="ta_grd">
                            <asp:ListView runat="server" ID="lvItems" ItemPlaceholderID="groupPlaceholder" GroupItemCount="3"
                                GroupPlaceholderID="layoutTemplate" OnPagePropertiesChanged="lvItems_PagePropertiesChanged">
                                <LayoutTemplate>
                                    <table id="layoutTemplate" runat="server" border="0" cellpadding="0" cellspacing="0">
                                    </table>
                                </LayoutTemplate>
                                <GroupTemplate>
                                    <tr>
                                        <div id="groupPlaceholder" runat="server">
                                        </div>
                                    </tr>
                                </GroupTemplate>
                                <ItemTemplate>
                                    <td style="padding: 0 0 15px 15px;">
                                        <asp:HyperLink ID="lnkItemDetails" runat="server" NavigateUrl=''>
                                            <div class="productItemStyle" onmouseover="javascript:this.style.background='#e5f4ff';this.style.border='solid 1px #3399cc';"
                                                onmouseout="javascript:this.style.background='#FFFFFF';this.style.border='solid 1px #cccccc';this.style.color='#353f45';"
                                                price='<%# Eval("BaseSellingPrice") %>' matchedprice='0' code='<%# Eval("ItemID") %>'>
                                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                    <tr>
                                                        <td align="center" style="padding: 5px">
                                                            <table>
                                                                <tr>
                                                                    <tr>
                                                                        <td align="center" id="rollover">
                                                                            <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# "~/ItemDetail.aspx?id=" + Eval("ItemID")  %>'>
                                                                                <asp:Image ID="img" runat="server" ImageUrl='<%# "~/ImageProcess.ashx?file=" + "~/Admin/images/items/" + Eval("ImageURL") + "&width=100&heigh=100&dd=true" %>'
                                                                                    AlternateText="No Image" />
                                                                                <span>
                                                                                    <asp:Image ID="Image1" runat="server" ImageUrl='<%# "~/ImageProcess.ashx?file=" + "~/Admin/images/items/" + Eval("ImageURL") + "&width=280&heigh=120&dd=true" %>'
                                                                                        AlternateText="No Image" /></span>
                                                                            </asp:HyperLink>
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td align="center">
                                                                            <p style="font-size: 12px; font-weight: bold">
                                                                                <%# Eval("ItemName") %>
                                                                            </p>
                                                                            <p style="padding-top: 7px">
                                                                                <span class="clsPrice">
                                                                                    <%# double.Parse (Eval("BaseSellingPrice").ToString()).ToString("0,00.##") %>
                                                                                    VNĐ </span>
                                                                            </p>
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td align="center" style="padding-top: 12px">
                                                                            <table border="0" cellspacing="3" cellpadding="0">
                                                                                <tr>
                                                                                    <td width="1" class="imglink">
                                                                                        <asp:HyperLink ID="HyperLink2" runat="server" ToolTip="Thêm vào giỏ hàng">
                                                                                            <asp:ImageButton ID="btnImage" runat="server" CommandName="ChonMua" CommandArgument='<%# Eval("ItemID") %>'
                                                                                                ImageUrl="~/images/bt_addtocart.png" OnClick="btnImage_Click" />
                                                                                        </asp:HyperLink>
                                                                                    </td>
                                                                                </tr>
                                                                            </table>
                                                                        </td>
                                                                    </tr>
                                                                </tr>
                                                            </table>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>
                                        </asp:HyperLink>
                                    </td>
                                </ItemTemplate>
                            </asp:ListView>
                        </table>
                    </td>
                </tr>
                <tr class="paging">
                    <td style="padding-bottom: 3px">
                        <asp:ImageButton ID="btxemthem" runat="server" ImageUrl="~/images/xem.png" OnClick="btxemthem_Click" />
                    </td>
                </tr>
            </table>
        </div>
    </div>
</div>

<script language="javascript" type="text/javascript">
    function fn_AddToCart(productCodeAndPrice) {
        PageMethods.SetShoppingCartSesstion(productCodeAndPrice, SetShoppingCart);
    }
</script>

